import json
# from utils.agent_connector import AgentConnector
from utils.api_connector import ApiConnector, ModelConnector
# from utils.doc_tree_indexer import DocTreeIndexer
# from workflow.gen_cli import main as gen_cli_main
# from workflow.gen_py import main as gen_py_main


if __name__ == '__main__':

    with open('testplan.json', 'r', encoding='utf-8') as f:
        test_plan = json.load(f)
        # print(test_plan)

    sample_case = test_plan[1]
    print("Building DocTreeIndexer...")
    # 创建文档分片器
    # doc_tree_indexer = DocTreeIndexer()
    
    # llm = AgentConnector()
    llm = ApiConnector()
    
    # cli_code = gen_cli_main(llm=llm, doc_splitter=doc_tree_indexer, sample_case=sample_case, verbose=True)
    
    # py_code = gen_py_main(llm=llm, cli_code=cli_code, write_file=None, verbose=True)
    
    # # model: ModelConnector = AgentConnector()
    
    # # model.send_request("请帮我分析一下这个测试计划的内容", verbose=True)
    
    llm.send_request("请帮我分析一下这个测试计划的内容", verbose=True)


